Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: lighten retry logic for LightPush #2182

Merged
merged 7 commits into from
Oct 16, 2024
Merged

Conversation

weboko
Copy link
Collaborator

@weboko weboko commented Oct 11, 2024

Problem

LightPush doesn't use autoRetry in current version.

Solution

Add it and simplify

Notes

@weboko weboko requested a review from a team as a code owner October 11, 2024 17:54
Copy link

github-actions bot commented Oct 11, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 85.51 KB (-0.01% 🔽) 1.8 s (-0.01% 🔽) 2 s (-18.44% 🔽) 3.7 s
Waku Simple Light Node 137.1 KB (-0.33% 🔽) 2.8 s (-0.33% 🔽) 2.8 s (+16.85% 🔺) 5.5 s
ECIES encryption 22.88 KB (0%) 458 ms (0%) 760 ms (+3.29% 🔺) 1.3 s
Symmetric encryption 22.37 KB (0%) 448 ms (0%) 506 ms (+32.35% 🔺) 953 ms
DNS discovery 72.9 KB (0%) 1.5 s (0%) 2.1 s (-3.91% 🔽) 3.6 s
Peer Exchange discovery 74.1 KB (0%) 1.5 s (0%) 1.4 s (+1.91% 🔺) 2.9 s
Local Peer Cache Discovery 68.03 KB (0%) 1.4 s (0%) 1.9 s (+22.96% 🔺) 3.3 s
Privacy preserving protocols 76.02 KB (+0.04% 🔺) 1.6 s (+0.04% 🔺) 1.5 s (-11.29% 🔽) 3.1 s
Waku Filter 79.56 KB (-0.31% 🔽) 1.6 s (-0.31% 🔽) 2.3 s (+43.26% 🔺) 3.8 s
Waku LightPush 75.03 KB (-3.54% 🔽) 1.6 s (-3.54% 🔽) 1.4 s (-19.05% 🔽) 2.9 s
History retrieval protocols 77.03 KB (-0.04% 🔽) 1.6 s (-0.04% 🔽) 2 s (-9.66% 🔽) 3.6 s
Deterministic Message Hashing 7.39 KB (0%) 148 ms (0%) 297 ms (+130.29% 🔺) 445 ms


private readonly reliabilityMonitor: SenderReliabilityMonitor;
export class LightPush implements ILightPush {
Copy link
Collaborator Author

@weboko weboko Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed BaseProtocolSDK for now as it is not used
let's follow up in #2186

@weboko weboko marked this pull request as draft October 11, 2024 22:20
@weboko weboko marked this pull request as ready for review October 15, 2024 23:12

export interface ISender {
send: (
encoder: IEncoder,
message: IMessage,
sendOptions?: ProtocolUseOptions
sendOptions?: ISenderOptions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be a breaking change since ProtocolUseOptions had a variable not in ISenderOptions. If someone has code where that optional variable was set, will it break upon updating?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true and no, ISenderOptions actually returns previously existed properties and now they are respected in this implementation

so the only breaking change is the naming

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new interface doesn't have forceUseAllPeers?: boolean;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forceUseAllPeers?: boolean;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good spot, afaik it wasn't used outside some of our tests

@weboko weboko changed the title feat: lighten retry logic for LightPush feat!: lighten retry logic for LightPush Oct 16, 2024
@weboko weboko merged commit 4049123 into master Oct 16, 2024
11 of 12 checks passed
@weboko weboko deleted the weboko/lighten-send-retry branch October 16, 2024 22:49
@weboko weboko mentioned this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants